package com.snow.useviewdemo.function.transition;

import android.os.Build;
import android.os.Bundle;
import android.transition.Explode;

import com.snow.useviewdemo.R;
import com.snow.useviewdemo.base.BaseActivity;

/**
 * Created by zhaoyingtao
 * Date: 2021/6/24
 * Describe:分解 效果 Activity
 */
public class ExplodeActivity extends BaseActivity {

    @Override
    protected int getLayoutId() {
        return R.layout.activity_resolve;
    }

    @Override
    protected void setViewData(Bundle savedInstanceState) {
        //进入退出效果 注意这里 创建的效果对象是 Explode()
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            getWindow().setEnterTransition(new Explode().setDuration(2000));
            getWindow().setExitTransition(new Explode().setDuration(2000));
        }
    }
}
